package com.pk.platform.business.flow.web;

import java.util.ArrayList;
import java.util.List;

import com.pk.platform.business.core.web.GenericAction;
import com.pk.platform.business.flow.service.IFlowDefineService;
import com.pk.platform.business.flow.vo.FlowModuleVO;
import com.pk.platform.domain.flow.FlowModule;

public class FlowDefineAction extends GenericAction {

	private List<FlowModule> fmList = new ArrayList<FlowModule>();
	
	private IFlowDefineService flowDefineService;
	
	private FlowModuleVO fmvo = new FlowModuleVO();
	
	private FlowModule fm = new FlowModule();
	
	private String[] fmIds;
	
	public String flowManage()
	{
		return SUCCESS;
	}
	
	public String moduleList()
	{
		fmList = flowDefineService.queryFlowModule();
		return SUCCESS;
	}
	
	public String flowList()
	{
		return SUCCESS;
	}
	
	public String saveModule()
	{
		flowDefineService.saveFlowModule(fm);
		return SUCCESS;
	}
	
	public String toAddModule()
	{
		return SUCCESS;
	}
	
	public String toUpdateModule()
	{
		fm = flowDefineService.queryFlowModuleById(fm.getId());
		return SUCCESS;
	}
	
	public String delModule()
	{
		if(fmIds != null)
		{
			message = flowDefineService.delFlowModule(fmIds);
		}
		return SUCCESS;
	}
	
	
	
	

	public List<FlowModule> getFmList() {
		return fmList;
	}

	public void setFmList(List<FlowModule> fmList) {
		this.fmList = fmList;
	}

	public IFlowDefineService getFlowDefineService() {
		return flowDefineService;
	}

	public void setFlowDefineService(IFlowDefineService flowDefineService) {
		this.flowDefineService = flowDefineService;
	}

	public FlowModuleVO getFmvo() {
		return fmvo;
	}

	public void setFmvo(FlowModuleVO fmvo) {
		this.fmvo = fmvo;
	}

	public FlowModule getFm() {
		return fm;
	}

	public void setFm(FlowModule fm) {
		this.fm = fm;
	}

	public String[] getFmIds() {
		return fmIds;
	}

	public void setFmIds(String[] fmIds) {
		this.fmIds = fmIds;
	}
	
}
